// TreeFile

@import '../../style/themes/default';
@import '../../style/mixins/index';
@import './param';

@mixin tree-file {
  display: flex;
  background-color: $--x-background;
  border-radius: $--x-border-radius;
  border: $--x-border-base;
  color: $--x-text;
  &-catalog {
    width: 0;
    overflow: auto;
    opacity: 0;
    font-size: 0.8125rem;
    transition: $--x-animation-duration-slow;
    .x-tree {
      padding: 0.5rem;
      &-node-content {
        height: 1.375rem;
        &:hover {
          background-color: $--x-border;
        }
        &.x-activated {
          background-color: $--x-border;
        }
      }
    }
  }
  &-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
  }
  &-crumb {
    background-color: $--x-background;
    display: flex;
    > x-link {
      line-height: 1.5rem;
      height: 1.5rem;
      transition: $--x-animation-duration-base;
      &:hover {
        // background-color: $--x-border;
      }
      > a {
        padding: 0 0.5rem;
      }
    }
    > x-crumb {
      flex: 1;
      > .x-crumb {
        padding: 0 0.5rem;
        color: $--x-text-300;
        .x-crumb-separator {
          margin: 0 0.125rem;
        }
      }
    }
  }
  &-content {
    flex: 1;
    overflow: auto;
    transition: $--x-animation-duration-slow;
    display: flex;
    min-height: 3rem;
    > x-highlight {
      border: none;
      > pre {
        overflow: inherit;
      }
    }
    > .#{$--x-tree-file}-img {
      margin: auto;
      padding: 1.5rem;
      display: flex;
      align-items: center;
      > img {
        max-width: 100%;
        height: auto;
        margin: auto;
        box-shadow: $--x-box-shadow-light;
        border-radius: $--x-border-radius;
        background-color: $--x-background-a100;
      }
    }
  }
  &-toggle {
    > .#{$--x-tree-file}-catalog {
      width: 16rem;
      opacity: 1;
      border-right: $--x-border-base;
    }
  }
}
